/*************************************************************************
 *************************************************************************
 	 	 	 	 	 	 	M2SMA : Logger.h
 *************************************************************************
 *
 	 Copyright (C) 2011
 	 TODO, Steven Costiou, France
 *
 **************************************************************************
 **************************************************************************
 *
	FILE COMMENT /// TODO
 *
 **************************************************************************
 **************************************************************************
 *
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/
 *
 **************************************************************************
 **************************************************************************/

#ifndef LOGGER_H_
#define LOGGER_H_

#include <time.h>

#include "log4cpp/Category.hh"
#include "log4cpp/FileAppender.hh"
#include "log4cpp/SimpleLayout.hh"

#ifndef LOG_DIRECTORY
#define LOG_DIRECTORY "../LOGS/"
#endif

class Logger{

	public:

		Logger();
		~Logger();

		/**
		 * Logging interface.
		 */
		void TRACE_EVENT(int aPriority, const char* anEvent);

	private:
		Logger(const Logger& aLogger);
		void initialize();
		void buildLogFileName();

	private:

		log4cpp::FileAppender* TRC_APP;
		log4cpp::Layout* TRC_LAYOUT;
		log4cpp::Category* TRC_CAT;

		const char* logFileName;
};

#endif /* LOGGER_H_ */
